// pages/weatherinfo/weatherinfo.js
Page({
  data:{
    weather:[],
    suggest:[],
    city:"",
    date:"",
    pm25:""
  },
  onLoad:function(options){
    console.log(options)
    var weatherinfo=JSON.parse(options.weatherinfo);
    console.log(weatherinfo);
    this.setData({
      date:weatherinfo.data.date,
      city:weatherinfo.data.results[0].currentCity,
      weather:weatherinfo.data.results[0].weather_data,
      suggest:weatherinfo.data.results[0].index,
      pm25:weatherinfo.data.results[0].pm25,
    })
    var that=this
     console.log(this.data.weather);
     wx.setNavigationBarTitle({
      title: that.data.city+'天气情况'
    })
  }
})